export default {
	data() {
		return {
			screenWidth: 0,
			num1: 0,
			num2: 0,
			num3: 0
		}
	},

	onShow() {

	},
	onLoad(option) {
		this.nums()
		uni.getSystemInfo({
			success: function(res) {
				console.log(res.screenWidth)
				this.screenWidth = res.screenWidth
			}
		});
	},

	methods: {
		back() {
			this.$tools.back(1)
		},
		nums() {
			let num = 100
			const timer = setInterval(() => {
				if (this.num1 >= num) {
					clearInterval(timer);
					console.log("Timer cleared.");
				} else {
					this.num1 += 1
				}
			}, 10);
			console.log(666);
			const timer1 = setInterval(() => {
				if (this.num2 >= num) {
					clearInterval(timer1);
					console.log("Timer cleared.");
				} else {
					this.num2 += 1
				}
			}, 80);
			const timer2 = setInterval(() => {
				if (this.num3 >= num) {
					clearInterval(timer2);
					console.log("Timer cleared.");
				} else {
					this.num3 += 1
				}
			}, 30);
		}
	}
}